home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilwb / closewbpatch.lzh / CloseWBPatch / CloseWbPatch.s next >
Text File  |  1996-10-29  |  18KB  |  479 lines

  1.  
  2. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3. *                                                                       *
  4. *                                                                       *
  5. *                    * * * *                                            *
  6. *                   *     *                                             *
  7. *                  *     *   _________________________________________  *
  8. *                 *     *   /                                        /  *
  9. *                *     *   /           Assembly Source of           /   *
  10. *               *     *   /           CloseWbPatch  v1.1           /    *
  11. *  * * * *     *     *   /                                        /     *
  12. *   *     *   *     *   /          - BURNAND  Patrick -          /      *
  13. *    *     * *     *   /                                        /       *
  14. *     *     *     *    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯        *
  15. *      *         *                                                      *
  16. *       * * * * *                                                       *
  17. *                                                                       *
  18. *                                                                       *
  19. *                                                                       *
  20. *   This source code is distributed with the CloseWbPatch package and   *
  21. *   may not be distrbuted by another way.   It must always be kept in   *
  22. *   original and unmodifed form.   This file is distributed for lear-   *
  23. *   ning purposes and as example only.  You are allowed to print this   *
  24. *   file but you aren't allowed to distribute it in printed form.  If   *
  25. *   you want  to  make  others uses of this source code,  contact the   *
  26. *   author.   My adress can be found in the doc file of this program.   *
  27. *                                                                       *
  28. *                                                                       *
  29. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  30.  
  31.  
  32.  
  33.  
  34. ** Main
  35.  
  36. ** 1.0
  37.  
  38.  
  39. **  CONSTANTES GLOBALES  **
  40.  
  41. ExecBase    EQU    4
  42.  
  43.  
  44. **  PROCÉDURES INTERNES  **
  45.  
  46. * XREF NewFunction            Code de la nouvelle fonction CloseWorkbench()
  47.  
  48.  
  49. **  PROCÉDURES EXTERNES  **
  50.  
  51. AddPort        EQU    -$0162
  52. AllocMem    EQU    -$00c6
  53. AllocSignal    EQU    -$014a        Exec.AllocSignal (SignalNum) (d0)
  54. ClearCacheU    EQU    -$027c        Exec.ClearCacheU () ()
  55. CloseLibrary    EQU    -$019E        Exec.CloseLibrary (library) (a1)
  56. CopyMem        EQU    -$0270
  57. CreateMsgPort    EQU    -$029a
  58. DeleteMsgPort    EQU    -$02a0
  59. FindPort    EQU    -$0186
  60. FindTask    EQU    -$0126        Exec.FindTask (name) (a1)
  61. Forbid        EQU    -$0084
  62. FreeMem        EQU    -$00d2
  63. FreeSignal    EQU    -$0150        Exec.FreeSignal (SignalNum) (d0)
  64. GetMsg        EQU    -$0174
  65. OpenLibrary    EQU    -$0228        Exec.OpenLibrary (name, version) (a1, d0)
  66. Permit        EQU    -$008a
  67. PutMsg        EQU    -$016e
  68. RemPort        EQU    -$0168
  69. ReplyMsg    EQU    -$017a        Exec.ReplyMsg (message) (a1)
  70. SetFunction    EQU    -$01a4
  71. SetTaskPri    EQU    -$012c
  72. WaitPort    EQU    -$0180
  73.  
  74.  
  75. **  CODE  **
  76.  
  77. Main:
  78.     Movem.l    a3/a6,-(a7)
  79.  
  80.     Move.l    ExecBase,a6            OwnTask := FindTask (NIL);                                             OwnTask := pointeur sur la tâche courante
  81.     Suba.l    a1,a1
  82.     Jsr    FindTask(a6)
  83.     Move.l    d0,OwnTask
  84.  
  85.     Move.l    d0,a3
  86. *    Move.l    OwnTask,a3            IF  (Process.pr_CLI # NIL)  THEN                                       SI  (le programme n'est pas lancé depuis le CLI)
  87.     Tst.l    $ac(a3)
  88.     Bne.w    M_NoWorkbench
  89.  
  90. *                          REPEAT                                                                 REPETER
  91. M_WaitWbMsg:
  92. *    Move.l    ExecBase,a6                ! := WaitPort (OwnTask.pr_MsgPort);                                    Attendre sur le port de la tâche
  93. *    Move.l    OwnTask,a3
  94.     Lea    $5c(a3),a0
  95.     Jsr    WaitPort(a6)
  96.  
  97. *    Move.l    ExecBase,a6                WbMsg := GetMsg (OwnTask.pr_MsgPort);                                  WbMsg := message du workbench
  98. *    Move.l    OwnTask,a3
  99.     Lea    $5c(a3),a0
  100.     Jsr    GetMsg(a6)
  101.     Move.l    d0,WbMsg
  102.  
  103. *    Tst.l    d0
  104. *    Tst.l    WbMsg                  UNTIL  (WbMsg # NIL);                                                  JUSQU'À CE QUE  (WbMsg soit valide)
  105.     Beq.s    M_WaitWbMsg
  106.  
  107.     Move.l    ExecBase,a6              ReplyMsg (WbMsg);                                                      Rendre le message au workbench
  108.     Move.l    WbMsg(pc),a1
  109.     Jsr    ReplyMsg(a6)
  110.  
  111.     Moveq    #0,d0                  ABORT;
  112.     Movem.l    (a7)+,a3/a6
  113.     Rts
  114. M_NoWorkbench:
  115. *                        END;                                                                   FIN
  116.  
  117.  
  118. *    Move.l    ExecBase,a6            Forbid ();                                                             Interdire la commutation des tâches
  119.     Jsr    Forbid(a6)
  120.  
  121. *    Move.l    ExecBase,a6            OldPort := FindPort (PortNamePtr);                                     Voir si le patch est déjà installé
  122.     Lea    PortNamePtr(pc),a1
  123.     Jsr    FindPort(a6)
  124.     Move.l    d0,OldPort
  125.  
  126. *    Move.l    ExecBase,a6            Permit ();                                                             Autoriser la commutation des tâches
  127.     Jsr    Permit(a6)
  128.  
  129.     Tst.l    OldPort                IF  (OldPort=NIL)  THEN                                                SI  (le patch n'est pas encore installé)
  130.     Bne.w    M_NoMsgPort
  131.  
  132. *    Move.l    ExecBase,a6              SigBit := AllocSignal (-1);
  133.     Moveq    #-1,d0
  134.     Jsr    AllocSignal(a6)
  135.     Move.b    d0,SigBit
  136.  
  137.     Cmp.b    #$FF,d0
  138. *    Cmp.b    #$FF,SigBit              IF  NOT (SigBit=-1)  THEN                                              Allouer un signal
  139.     Beq.w    M_NoSignal                                                                                               SI  (l'allocation du signal a fonctionné)
  140.  
  141.     Lea    MsgPort(pc),a0                                                                                             Installer le port de message
  142.     Move.b    SigBit(pc),15(a0)            MsgPort.mp_SigBit := SigBit;                                           Bit de signal
  143.     Move.l    OwnTask(pc),16(a0)            MsgPort.mp_SigTask := OwnTask;                                         Signaler notre propre tâche
  144.  
  145. *    Move.l    ExecBase,a6                AddPort (MsgPort);                                                     Rendre le port public (visible des autres tâches)
  146.     Lea    MsgPort(pc),a1
  147.     Jsr    AddPort(a6)
  148.  
  149. *    Move.l    ExecBase,a6                IntuitionBase := OpenLibrary (ADR(IntuitionName),36);                  Ouvrir la librairie Intuition
  150.     Lea    IntuitionName(pc),a1
  151.     Moveq    #36,d0
  152.     Jsr    OpenLibrary(a6)
  153.     Move.l    d0,IntuitionBase
  154.  
  155.     Tst.l    d0
  156. *    Tst.l    IntuitionBase                IF  (IntuitionBase#NIL)  THEN                                          SI  (l'ouverture de la librairie a fonctionné)
  157.     Beq.w    M_NoIntuition
  158.  
  159. *    Move.l    ExecBase,a6                  OldFunction := SetFunction (IntuitionBase, -$004e, ADR(NewFunction));  Installer la nouvelle fonction
  160.     Move.l    d0,a1
  161. *    Move.l    IntuitionBase,a1
  162.     Suba.l    a0,a0
  163.     Move.w    #-$004e,a0
  164.     Move.l    #NewFunction,d0
  165.     Jsr    SetFunction(a6)
  166.     Move.l    d0,OldFunction
  167.  
  168. *                              DO                                                                     FAIRE
  169. Forever:
  170. *    Move.l    ExecBase,a6                    ! := WaitPort (MsgPort);                                               Attendre un message de l'éventuelle autre tâche
  171.     Lea    MsgPort(pc),a0
  172.     Jsr    WaitPort(a6)
  173.  
  174. *    Move.l    ExecBase,a6                    ! := GetMsg (MsgPort);                                                 Prendre le message
  175.     Lea    MsgPort(pc),a0
  176.     Jsr    GetMsg(a6)
  177.  
  178.     Eor.b    #$FF,Active                    Active := NOT (Active);                                                Inverser l'état d'activation du patch
  179.  
  180.     Lea    M_EasyStruct(pc),a1
  181.     Move.l    #ActiveText,12(a1)                M_EasyStruct.Text := ActiveText                                        Texte de la requête := ActiveText
  182.     Move.l    #OkGadgets,16(a1)                M_EasyStruct.Gadgets := OkGadgets                                      Gadgets de la requête := OkGadgets
  183.  
  184.     Tst.b    Active                        IF  (Active=FALSE)  THEN                                               SI  (le patch n'est pas actif)
  185.     Bne.s    M_Inactive
  186.     Move.l    #InactiveText,12(a1)                  M_EasyStruct.Text := InactiveText                                      Texte de la requête := InactiveText
  187. M_Inactive:
  188. *                                END;                                                                   FIN
  189.  
  190.     Movem.l    a2/a3/a6,-(a7)
  191.     Move.l    IntuitionBase(pc),a6
  192.     Suba.l    a2,a2                        (IDCMP_Ptr)
  193. *    Suba.l    a3,a3                        (ArgList)
  194.     Move.l    a2,a3
  195. *    Suba.l    a0,a0                        (Window)
  196.     Move.l    a3,a0
  197.     Jsr    EasyRequestArgs(a6)                ! := EasyRequestArgs(NIL, M_EasyStruct, NIL, NIL)                      Afficher la requête
  198.     Movem.l    (a7)+,a2/a3/a6
  199.  
  200.     Bra.s    Forever                      LOOP                                                                   INDÉFINIMENT
  201.  
  202. *    Move.l    ExecBase,a6                  CloseLibrary (IntuitionBase);                                          Fermer la librairie Intuition
  203.     Move.l    IntuitionBase(pc),a1
  204.     Jsr    CloseLibrary(a6)
  205. M_NoIntuition:
  206. *                            END;                                                                   FIN
  207.  
  208. *    Move.l    ExecBase,a6                Forbid ();                                                             Interdire la commutation des tâches
  209.     Jsr    Forbid(a6)
  210.  
  211. *    Move.l    ExecBase,a6                RemPort (MsgPort);                                                     Rendre le port de message privé (Invisible des autres tâches)
  212.     Lea    MsgPort(pc),a1
  213.     Jsr    RemPort(a6)
  214.  
  215. *    Move.l    ExecBase,a6                Permit ();                                                             Autoriser la commutation des tâches
  216.     Jsr    Permit(a6)
  217.  
  218. *    Move.l    ExecBase,a6                FreeSignal (SigBit);                                                   Libérer le bit de signal
  219.     Moveq    #0,d0
  220.     Move.b    SigBit(pc),d0
  221.     Jsr    FreeSignal(a6)
  222.  
  223. M_NoSignal:
  224. *                          END;                                                                   FIN
  225.     Bra.s    M_NoMsgPortF
  226. M_NoMsgPort:
  227. *                        ELSE                                                                   SINON
  228.  
  229. *    Move.l    ExecBase,a6              PutMsg (OldPort, Message);                                             Envoyer un message à l'autre tâche
  230.     Move.l    OldPort(pc),a0
  231.     Lea    Message(pc),a1
  232.     Jsr    PutMsg(a6)
  233.  
  234. M_NoMsgPortF:
  235. *                        END;                                                                   FIN
  236.  
  237.     Moveq    #0,d0                RETURN  M_Return;                                                      Retourner le code d'erreur
  238.     Movem.l    (a7)+,a3/a6
  239.     Rts
  240.  
  241.  
  242. **  CONSTANTES GLOBALES  **
  243.  
  244. Version        dc.b    '$VER: CloseWbPatch 1.1 (14.10.96)',0
  245. CloseWbTitle    dc.b    'CloseWbPatch 1.1 by Burnand Patrick',0
  246.  
  247.  
  248. **  CONSTANTES LOCALES  **
  249.  
  250. IntuitionName    dc.b    'intuition.library',0
  251. PortNamePtr    dc.b    'CloseWbPatch',0
  252. Message        dc.l    0        Message.mn_Node.ln_Succ
  253.         dc.l    0        Message.mn_Node.ln_Pred
  254.         dc.b    0        Message.mn_Node.ln_Type
  255.         dc.b    0        Message.mn_Node.ln_Pri
  256.         dc.l    PortNamePtr    Message.mn_Node.ln_Name
  257.         dc.l    0        Message.mn_ReplyPort
  258.         dc.w    24        Message.mn_Length
  259.         dc.l    -1        Contenu du message
  260. ActiveText    dc.b    'CloseWbPatch is now active !',0
  261. InactiveText    dc.b    'CloseWbPatch is now inactive !',0
  262. OkGadgets    dc.b    'Ok !',0
  263.  
  264.  
  265. **  VARIABLES GLOBALES  **
  266.  
  267. OldFunction    dc.l    0    APTR                        Pointeur sur la fonction originale
  268. Active        dc.b    $FF    BOOLEAN                        Initialisé à FALSE
  269.  
  270.  
  271. **  VARIABLES LOCALES  **
  272.  
  273. MsgPort        dc.l    0        MsgPort.mp_Node.ln_Succ
  274.         dc.l    0        MsgPort.mp_Node.ln_Pred
  275.         dc.b    4        MsgPort.mp_Node.ln_Type = NT_MSGPORT
  276.         dc.b    0        MsgPort.mp_Node.ln_Pri = 0
  277.         dc.l    PortNamePtr    MsgPort.mp_Node.ln_Name = PortNamePtr
  278.         dc.b    0        MsgPort.mp_Flags = PA_SIGNAL
  279.         dc.b    0        MsgPort.mp_SigBit
  280.         dc.l    0        MsgPort.mp_SigTask
  281.         dc.l    0        MsgPort.mp_MsgList
  282.         dc.l    0        ...
  283.         dc.l    0        ...
  284.         dc.w    0        ...
  285. M_EasyStruct    dc.l    20        sizeof(EasyStruct)
  286.         dc.l    0        Flags
  287.         dc.l    CloseWbTitle    Title
  288.         dc.l    0        TextFormat
  289.         dc.l    0        GadgetFormat
  290. OwnTask        dc.l    0        APTR        Exec.TaskPtr
  291. ActualPri    dc.b    0        BYTE
  292. SigBit        dc.b    0        BYTE        Exec.SignalBit
  293.         dc.b    0
  294. OldPort        dc.l    0        APTR        Exec.MsgPortPtr
  295. IntuitionBase    dc.l    0        APTR        Intuition.LibraryBasePtr
  296. WbMsg        dc.l    0        APTR        Exec.MessagePtr
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304. ** NewFunction (): BOOLEAN
  305.  
  306. ** 1.1
  307.  
  308.  
  309. **  PARAMETRES  **
  310.  
  311. * Entree:
  312. * Sortie:
  313. *    BOOLEAN        TRUE si le workbench a été fermé.  FALSE sinon.
  314.  
  315.  
  316. **  CONSTANTES GLOBALES  **
  317.  
  318. TaskNameMaxLen    EQU    30
  319.  
  320.  
  321. **  PROCÉDURES EXTERNES  **
  322.  
  323. WBenchToFront    EQU    -$0156        Intuition.WBenchToFront () ()
  324. WBenchToBack    EQU    -$0150        Intuition.WBenchToBack () ()
  325. EasyRequestArgs    EQU    -$024c
  326.  
  327.  
  328. **  CODE  **
  329.  
  330.     XDEF    NewFunction
  331.  
  332. NewFunction:
  333.     Tst.b    Active                IF  (Active=TRUE)  THEN                                                SI  (le patch est actif)
  334.     Beq.w    NF_Inactive
  335.  
  336.     Jsr    WBenchToFront(a6)          IF  (WBenchToFront()=TRUE)  THEN                                       Mettre l'écran du Workbench en avant-plan
  337.     Tst.b    d0                                                                                                       SI  (l'écran du workbench existe)
  338.     Beq.w    NF_NoWorkbench
  339.  
  340.     Move.l    a6,-(a7)
  341.     Move.l    ExecBase,a6                ! := FindTask (NIL);                                                   ! := pointeur sur la tâche courante
  342.     Suba.l    a1,a1
  343.     Jsr    FindTask(a6)
  344.     Move.l    (a7)+,a6
  345.  
  346.     Lea    CloseWbText0(pc),a0                        Générer chaîne à afficher
  347.     Lea    CloseWbText(pc),a1
  348. NF_CpLoop1:
  349.     Move.b    (a0)+,(a1)+
  350.     Bne.s    NF_CpLoop1
  351.     Subq.w    #1,a1
  352.  
  353.     Move.l    d0,a0                                Ajouter le nom de la tâche
  354.     Move.l    10(a0),a0                            Copier # chars maxi
  355.     Move.b    #TaskNameMaxLen,d0
  356. NF_CpLoop2:
  357.     Subq.b    #1,d0
  358.     Beq.s    NF_CpLoop2_O
  359.     Move.b    (a0)+,(a1)+
  360.     Bne.s    NF_CpLoop2
  361.     Subq.w    #1,a1
  362. NF_CpLoop2_O:
  363.  
  364.     Lea    CloseWbText1(pc),a0                        Ajouter fin du txt
  365. NF_CpLoop3:
  366.     Move.b    (a0)+,(a1)+
  367.     Bne.s    NF_CpLoop3
  368.  
  369.     Movem.l    a2/a3,-(a7)
  370.     Lea    NF_EasyStruct(pc),a1            (EasyStruct)
  371.     Move.l    #CloseWbText,12(a1)            NF_EasyStruct.Text := CloseWbText1                                     Texte de la requête := CloseWbText1
  372.     Move.l    #CloseWbGadgets1,16(a1)            NF_EasyStruct.Gadgets := CloseWbGadgets1                               Gadgets de la requête := CloseWbGadgets1
  373.     Suba.l    a2,a2                    (IDCMP_Ptr)
  374. *    Suba.l    a3,a3                    (ArgList)
  375.     Move.l    a2,a3
  376. *    Suba.l    a0,a0                    (Window)
  377.     Move.l    a3,a0
  378.     Jsr    EasyRequestArgs(a6)            IF  (EasyRequestArgs(NIL, NF_EasyStruct, NIL, NIL) = 0)  THEN          Afficher la requête
  379.     Movem.l    (a7)+,a2/a3                                                                                                SI  (l'utilisateur sélectionne non)
  380.     Tst.b    d0
  381.     Bne.s    NF_Yes
  382.  
  383.     Move.b    #0,NF_Return                  NF_Return := FALSE;                                                    Le code de retour est faux  (écran n'a pas pu être fermé)
  384.  
  385.     Bra.s    NF_No                    ELSE                                                                   SINON
  386. NF_Yes:
  387. NF_Loop:
  388. *                              REPEAT                                                                 REPETER
  389.     Move.l    OldFunction(pc),a0                Flag := OldFunction();                                                 Essayer de fermer l'écran (en appelant fonction originale)
  390.     Jsr    (a0)                                                                                                           Le Flag égale ce que retourne la fonction originale
  391.     Move.b    d0,Flag
  392. *    Move.b    Flag,NF_Return                    NF_Return := Flag;                                                     Le code de retour égale le Flag
  393.     Move.b    d0,NF_Return
  394.  
  395. *    Tst.b    Flag                        IF  (Flag=FALSE)  THEN                                                 SI  (le Flag=FALSE)
  396.     Tst.b    d0
  397.     Bne.s    NF_FlagOk
  398.  
  399.     Movem.l    a2/a3,-(a7)
  400.     Lea    NF_EasyStruct(pc),a1                (EasyStruct)
  401.     Move.l    #CloseWbText2,12(a1)                  NF_EasyStruct.Text := CloseWbText2                                     Texte de la requête := CloseWbText2
  402.     Move.l    #CloseWbGadgets2,16(a1)                  NF_EasyStruct.Gadgets := CloseWbGadgets2                               Gadgets de la requête := CloseWbGadgets2
  403.     Suba.l    a2,a2                        (IDCMP_Ptr)
  404. *    Suba.l    a3,a3                        (ArgList)
  405.     Move.l    a2,a3
  406. *    Suba.l    a0,a0                        (Window)
  407.     Move.l    a3,a0
  408.     Jsr    EasyRequestArgs(a6)                  IF  (EasyRequestArgs(NIL, NF_EasyStruct, NIL, NIL)=0)  THEN            Afficher la requête
  409.     Movem.l    (a7)+,a2/a3                                                                                                      SI  (la requête retourne faux)
  410.     Tst.b    d0
  411.     Bne.s    NF_Retry
  412.  
  413.     Eor.b    #$FF,Flag                        Flag := TRUE;                                                          Le Flag égale TRUE
  414. *                                  END;                                                                   FIN
  415. NF_Retry:
  416. *                                END;                                                                   FIN
  417. NF_FlagOk:
  418.     Tst.b    Flag                      UNTIL  (Flag=TRUE);                                                    JUSQU'À CE QUE  (le Flag=TRUE)
  419.     Beq.s    NF_Loop
  420.  
  421. NF_No:
  422. *                            END;                                                                   FIN
  423.  
  424.     Bra.s    NF_NoWorkbenchF              ELSE                                                                   SINON
  425. NF_NoWorkbench:
  426.     Move.b    #0,NF_Return                NF_Return := FALSE;                                                    Le code de retour est faux  (écran non-présent)
  427. NF_NoWorkbenchF:
  428. *                          END;                                                                   FIN
  429.  
  430.     Bra.s    NF_InactiveF
  431. NF_Inactive:
  432. *                        ELSE                                                                   SINON
  433.  
  434.     Move.l    OldFunction(pc),a0          NF_Return := OldFunction();                                            Essayer de fermer l'écran (en appelant fonction originale)
  435.     Jsr    (a0)                                                                                                     Le code de retour égale ce que retourne la fonction originale
  436.     Move.b    d0,NF_Return
  437.  
  438. NF_InactiveF:
  439. *                        END;                                                                   FIN
  440.  
  441.     Moveq    #0,d0                RETURN NF_Return;                                                      Retourner le code de retour
  442.     Move.b    NF_Return(pc),d0
  443.     Rts
  444.  
  445.  
  446. **  VARIABLES GLOBALES  **
  447.  
  448. *    XREF    OldFunction
  449. *    XREF    Active
  450.  
  451.  
  452. **  CONSTANTES LOCALES  **
  453.  
  454. CloseWbText0    dc.b    'The task named "',0
  455. CloseWbText0F
  456. CloseWbText1    dc.b    '" wants',10
  457.         dc.b    "to close the Workbench screen...",0
  458. CloseWbText1F
  459. CloseWbGadgets1    dc.b    "Allow closing|Don't close",0
  460. CloseWbText2    dc.b    "Unable to close the Workbench screen.",10
  461.         dc.b    "Close all the non-Workbench windows.",0
  462. CloseWbGadgets2    dc.b    'Retry|Cancel',0
  463.  
  464.  
  465. **  VARIABLES LOCALES  **
  466.  
  467. Flag        dc.b    0    BOOLEAN                        Initialisé à FALSE
  468. NF_Return    dc.b    0    BOOLEAN                        Initialisé à FALSE
  469. NF_EasyStruct    dc.l    20        sizeof(EasyStruct)
  470.         dc.l    0        Flags
  471.         dc.l    CloseWbTitle    Title
  472.         dc.l    0        TextFormat
  473.         dc.l    0        GadgetFormat
  474.  
  475. CloseWbText:    ds.b    (CloseWbText0F-CloseWbText0)+(CloseWbText1F-CloseWbText1)+TaskNameMaxLen+2
  476. *                        Buffer pour chaîne à afficher
  477.  
  478.     End
  479.